﻿using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace Bombardiman
{
    public class FileLoader
    {
        private static FileLoader fileLoaderObj = null;
        //Texture2D speedBoxTexture;
        //Texture2D healthBoxTexture;
        private Texture2D wallTexture;
        private Texture2D bombTexture;
        private Texture2D playerTexture;
        private Texture2D destWallTexture;
        private Texture2D enemyTexture;
        private Texture2D explosionTexture;
        private FileLoader(ContentManager content)
        {
            //speedBoxTexture = content.Load<Texture2D>("speedBox");
            //healthBoxTexture = content.Load<Texture2D>("healthBox");
            wallTexture = content.Load<Texture2D>("nonwall");
            destWallTexture = content.Load<Texture2D>("wall");
            bombTexture = content.Load<Texture2D>("bomb");
            playerTexture = content.Load<Texture2D>("player");
            enemyTexture = content.Load<Texture2D>("enemy");
            explosionTexture = content.Load<Texture2D>("explosion");
        }

        public static FileLoader getInstance()
        {
            if ( fileLoaderObj == null)
                fileLoaderObj = new FileLoader(GameEngine.getInstance().getContent());
            return fileLoaderObj;
        }

        /*public Texture2D getSpeedBoxTexture()
        {
            return speedBoxTexture;
        }
        public Texture2D getHealthBoxTexture()
        {
            return healthBoxTexture;
        }*/

        public Texture2D getExplosionTexture()
        {
            return explosionTexture;
        }
        public Texture2D getWallTexture()
        {
            return wallTexture;
        }
        public Texture2D getBombTexture()
        {
            return bombTexture;
        }
        public Texture2D getPlayerTexture()
        {
            return playerTexture;
        }

        public Texture2D getDestructableWallTexture()
        {
            return destWallTexture;
        }

        public Texture2D getEnemyTexture()
        {
            return enemyTexture;
        }
    }
}
